#pragma once


class ActionBase;
class LoginAction;
class UserInfo;


class QMessageMaker
{
public:
    QMessageMaker();
    ~QMessageMaker();

    QString MakeLoginMessage(QString const& userName);

    QString MakeQueryUserMessage(std::shared_ptr<LoginAction> pAction);

    QString MakeGetUserInfoListMessage(
        QString const& userName,
        QString const& token);

    QString MakeGetUserInfoListResultMessage(
        bool isOk,
        QString const& userName,
        QString const& token,
        QVector<UserInfo> const& userInfoList,
        QString const& errMsg);

    QString MakeQueryUserNameResultMessage(
        bool isOk,
        QString const& userName,
        QString const& errMsg);

    QString MakeLoginResultMessage(
        bool IsSuccess,
        QString const& userName,
        QString const& token,
        QString const& errMsg);

    QString MakeSendMessage(
        QString const& userName,
        QString const& token,
        QString const& msg);

    QString MakeGetMessage(QString const& userName, QString const& msg);

    std::shared_ptr<ActionBase> ParseAction(QString const& actionString);
};

